BuffEffect25 = BaseBuffEffect:new();
BuffEffect25.__index = BuffEffect25;

function BuffEffect25:new()
    local object = {};
    setmetatable(object, BuffEffect25);
    return object;
end

function BuffEffect25:action(fight,buff,...)
    local fighter = nil;
    local buffEffectValue = decodeJsonStrToTabel(buff.buffBean.f_BuffEffectValue);
    if buffEffectValue[2] == 0 then
        fighter = buff.source;
    else
        fighter = buff.target;
    end

    local hp = fighter.HP;
    local maxHp = FighterAttributeManager.getFightAttr(fighter,EnumConst.FighterAttributeEnum.HP);
    local add = (maxHp - hp) * buffEffectValue[4] / EnumConst.TEN_THOUSANDTH + buffEffectValue[1];

    buff.value.attributes[buffEffectValue[3]] = add;
    fightLog("[EFFECT]Fighter "..buff.target.fighterId.." Buff"..buff.modelId.." 触发增加已损失血量%的属性BUFF效果，增加("..buffEffectValue[3]..")"..add);

    return BaseBuffEffect:action(fight, buff, ...);
end